-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finishes Audit Log Interface #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I maintain that all these Standard*
things should just be layout
s, but you've explained this to me in the past (not that I remember the logic at this moment) so I won't harp on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case StandardFullWidth, note this is not a page layout, it's for a component within a standard-width page that needs to expand the boundaries. This allows most page components (i.e. header, footer, titlebar, etc) to look right while allowing exceptionally wide things (in this case a PVTable) to be full-screen-width.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait I didn't actually review the bulk of this change, the GH UI had hidden pages/audit-logs.vue
, looking at that now
frontend/pages/audit-logs.vue
Outdated
@@ -105,6 +194,11 @@ const allColumns: Column[] = [ | |||
field: 'action', | |||
header: tt('Action'), | |||
customBody: true, | |||
filterType: FilterType.EnumBased, | |||
enumValues: Object.values(AuditLogAction).map((a: AuditLogAction) => ({ | |||
label: `${a}`.replace('AuditLogAction', ''), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to stringify the enum, typescript is smart enough to know it's a string enum:
label: `${a}`.replace('AuditLogAction', ''), | |
label: a.replace('AuditLogAction', ''), |
That said, this is fragile in the sense that it depends on some internal behavior of our TS codegen. I think it's fine in this case since its just a convenience thing, but the more robust (and tedious) approach would be to maintain the mapping explicitly
Notable Elements:
createdAt
. This also encapsulates the off-by-one error to make it so that the calendar filter will include logs from the selected dates (a reasonable default)PVMultiSelect
andPVChips
across the board to useflex
(with Gap) rather than relying on margin bottom + left.StandardFullWidth
component to put the logic for how to escape the standard-content's width constraints in a single place.:
3.32.0 => 3.32.1
to fix Datatable: Menu Filter Icon Click Causes Column to Sort primefaces/primevue#4268